README 

Replication file for "An Agency Perspective on Immigration Federalism"

Author: Asya Magazinnik (Hertie School)

Dataverse DOI: doi:10.7910/DVN/RZKLTA

---

INCLUDED FILES

All files are described in greater detail in the sections below. 

Data: 
	1) full_y.csv  
	2) full_my.csv

Codebook: 
	1) codebook.pdf

Code:
	1) replication_main.R
	2) replication_appendix.R
---

COMPUTING ENVIRONMENT

- All R analyses were carried out with R version 4.3.2
- Additionally, R analyses use the following packages: 
	- tidyverse (version 2.0.0)
	- multiwayvcov (version 1.2.3)
	- lmtest (version 0.9-40)
	- stargazer (version 5.2.3)
	- lubridate (version 1.9.3)
	- zoo (version 1.8-12)
	- choroplethrMaps (version 1.0.1)
	- PanelMatch (version 2.0.1)

---

ANALYSIS DATASETS

1) Dataset: full_y.csv
Variables: 
1.	year  
2.	GEO_id  
3.	date1   
4.	sc   
5.	denied   
6.	treat   
7.	control   
8.	pop   
9.	pct_dem   
10.	prot2006
11.	sec_comm
12.	foreign
13.	prop_foreign   
14.	prop_undoc_fb
15.	delta5_foreign
16.	unemp_imp   
17.	total_crimes   
18.	ice_custody   
19.	ndetainees   
20.	ndetainees_county   
21.	ndetainees_federal   
22.	ndetainees_ice   
23.	ndetainees_local   
24.	ndetainees_state   
25.	ncharged   
26.	ncharged_low   
27.	ncharged_med   
28.	ncharged_high  
29.	ncharged_county   
30.	ncharged_low_county   
31.	ncharged_med_county   
32.	ncharged_high_county  
33.	signer


2) Dataset: full_my.csv
Variables: 
1.	year   
2.	my   
3.	date   
4.	date1   
5.	treat   
6.	control   
7.	sc   
8.	ndetainees   
9.	ice_custody
10.	pop   
11.	total_crimes   
12.	foreign   
13.	prop_undoc_fb   

---

CODE FOR REPRODUCING ALL RESULTS IN PAPER

1) replication_main.R
	Description: This code executes all of the main analyses presented in the body of the paper. 
	Produces: 
	- pretrend_logged_detainers.pdf (Figure 1)
	- pretrend_coop_rate.pdf (Figure 1)
	- main_effects.tex (Table 1)
	- effects_policing.tex (Table 2)

2) replication_appendix.R
	Description: This code executes all of the analyses presented in the appendix. 
	Produces: 
	- detpermo.pdf (Figure B.1)
	- map.pdf (Figure B.2)
	- balance.tex (Table B.3)
	- pretrends_matched.pdf (Figure C.1)
	- did_main.tex (Table C.1)
	- did_charge.tex (Table C.2)




